#ifndef _COMM_HPP_
#define _COMM_HPP_
#include <iostream>
#include <sys/types.h>
#include <sys/ipc.h>
#include <cerrno>
#include <cstring>
#include <cstdlib>
#include <cstdio>
// #include <stdio.h>
#define PATHNAME "."
#define PROJ_ID 0X66

key_t getKey()
{
    key_t k = ftok(PATHNAME, PROJ_ID);
    if (k < 0)
    {
        std::cerr << errno << ":" << strerror(errno) << std::endl;
        exit(1);
    } 
    return k;
}

#endif
